﻿<%@ WebHandler Language="C#" Class="data" %>

using System;
using System.Web;

public class data : IHttpHandler {
    
    public void ProcessRequest (HttpContext context) {
        context.Response.ContentType = "text/plain";
        context.Response.Write("Hello World");
    }

    private string getGrid(HttpContext context)
    {
        //int page = int.TryParse(context.Request.Form["page"] ?? string.Empty, out page) ? page : 1;
        //int rows = int.TryParse(context.Request.Form["rows"] ?? string.Empty, out rows) ? rows : 15;
        ////            DateTime dateBegin = DateTime.TryParse(context.Request.Form["dateBegin"] ?? string.Empty, out dateBegin)
        ////                ? dateBegin
        ////                : DateTime.Now;
        ////            DateTime dateEnd = DateTime.TryParse(context.Request.Form["dateEnd"] ?? string.Empty, out dateEnd)
        ////                ? dateEnd
        ////                : DateTime.Now;
        //DateTime? dateBegin = null, dateEnd = null;
        //DateTime dtBegin, dtEnd;
        //string dBegin = context.Request.Form["dateBegin"] ?? string.Empty;
        //var dEnd = context.Request.Form["dateEnd"] ?? string.Empty;
        //if (!string.IsNullOrEmpty(dBegin) && !string.IsNullOrEmpty(dEnd) && DateTime.TryParse(dBegin, out dtBegin) && DateTime.TryParse(dEnd, out dtEnd))
        //{
        //    dateBegin = dtBegin;
        //    dateEnd = dtEnd;
        //}
        //var dataDal = new dataDal();
        //var json = dataDal.getOperatingRecordGrid(page, rows, dateBegin, dateEnd);
        return null;
    }                            
    
    public bool IsReusable {
        get {
            return false;
        }
    }

}